From 753185e1fa6e8bfa4412d9554955b3ddb28e327e Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 18 May 2010 23:51:55 -0400 Subject: [PATCH] * textmodes/fill.el (fill-region): Don't fill past the end. --- lisp/ChangeLog | 4 ++++ lisp/textmodes/fill.el | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cc4f990d16f..444dfcaa1cf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-05-19 Uday S Reddy (tiny change) + + * textmodes/fill.el (fill-region): Don't fill past the end (bug#6201). + 2010-05-18 Stefan Monnier * subr.el (read-quoted-char): Resolve modifiers after key diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 1b3cc8dc4d8..da6e02bfa2f 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -1036,7 +1036,7 @@ space does not end a sentence, so don't break a line there." (fill-forward-paragraph -1)) (if (< (point) beg) (goto-char beg)) - (if (>= (point) initial) + (if (and (>= (point) initial) (< (point) end)) (setq fill-pfx (fill-region-as-paragraph (point) end justify nosqueeze)) (goto-char end)))) -- 2.30.2